package com.hx.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author zhangyiming
 * @date 2022/3/2 14:00
 */
@Controller
public class RedirectController  {

    @GetMapping("/{url}")
    public String redirect(@PathVariable("url") String url){
        return url;
    }
    @GetMapping("/")
    public String main(){
        return "redirect:/productCategory/main";
    }
    @GetMapping("favicon.ico")
    @ResponseBody
    void returnNoFavicon(){
    }
}
